/*************/
/* Variables */
/*************/

extern boolean AnyStatementProfile;
extern boolean AnyTimeProfile;
extern boolean OpProfileStatement;
extern boolean OpProfileTime;
extern boolean OpTrace;
extern boolean OpTypeCheck;
extern boolean OpWarning;

extern int current_file_no;
extern int gline_number;
extern int line_number;
extern int max_stack_per_call;
extern int op_info1;
extern int op_info2;
extern int previous_op;
extern int token_name;
extern int token_sym;
extern int toplevelsub;

extern int *buckets;

extern long **symtab;

extern char *fe_buffer;

extern char **name_area;
extern char **user_files;


boolean backed_tok;
boolean func_return;
boolean lhs_ptr;
boolean optimized_while;
boolean OpWarning_called;
boolean short_circuit;
boolean short_circuit_B;

int branch_list_extra;
int branch_list_pos;
int code_area_extra;
int code_area_pos;
int current_sequence_extra;
int current_sequence_pos;
int currentsub;
int dup_globals_last;
int dup_globals_max;
int e_list_extra;
int e_list_pos;
int exit_list_extra;
int exit_list_pos;
int factors;
int init_stack_extra;
int init_stack_pos;
int last_branch;
int last_line_number;
int left_sym;
int lhs_subs_level;
int lhs_subs1_copy_temp;
int loop_nest;
int param_num;
int sample_size;
int save_code_area_pos;
int SC1_patch;
int SC1_type;
int seg_extra;
int seg_pos;
int stmt_nest;
int temps_allocated;
int tls_extra;
int tls_pos;

int *branch_list;
int *current_sequence;
int *dup_globals;
int *e_list;
int *exit_list;
int *init_stack;

int **code_area;


/************/
/* Routines */
/************/

extern char * string_token();

static void expr();
static void statement_list();


/***********/
/* Defines */
/***********/

#define BACKPATCH(x, y) \
code_area[code_area_pos][x] = y

/* If no token is backed up, grab the next token and back
   it up. Useful for checking the next token. */
#define BACKUP_NEXT_TOKEN \
if (!backed_tok) { \
    scanner(); \
    backed_tok = 1; \
}

/* Set backed_tok to 1, which keeps scanner from being
   called next time NEXT_TOKEN is called. Nothing more
   needs to be done, since token_name and token_sym are
   local variables. */
#define BACKUP_TOK \
backed_tok = 1;

/* If there is no token to preserve, call scanner to write
   new values to token_name and token_sym. */
#define NEXT_TOKEN \
if (!backed_tok) \
    scanner(); \
else \
    backed_tok = 0; \

#define ST_ROUTINE 19

#define NOVALUE               ((long)0xbfffffffL)
#define IS_ATOM_INT(ob)       (((long)(ob)) > NOVALUE)

